package com.micangcaihang.micang.mvp.task.contract;

import com.micangcaihang.common.base.mvp.BaseModel;
import com.micangcaihang.common.base.mvp.BasePresenter;
import com.micangcaihang.common.base.mvp.IBaseView;
import com.micangcaihang.common.http.ApiResult;
import com.micangcaihang.micang.entity.FTaskFaceOpinionLoanConditionEntity;

import io.reactivex.Observable;

/**
 * <pre>
 *     author : Fandy
 *     e-mail : fandayongfly@gmail.com
 *     time   : 2017/07/30
 *     update : 2017/07/30
 *     desc   : 风控-面审意见放款条件
 *     version: 1.0
 * </pre>
 */

public interface FTaskFaceOpinionLoanConditionContract {
    interface View extends IBaseView {

        /**
         * 返回借款人信息
         *
         * @param entity
         */
        void returnFaceOpinionLoanConditionData(FTaskFaceOpinionLoanConditionEntity entity);
    }

    interface Model extends BaseModel {

        /**
         * 获取借款人信息数据
         *
         * @return
         */
        Observable<ApiResult<FTaskFaceOpinionLoanConditionEntity>> getFaceOpinionLoanConditionData(String id);

        /**
         * 保存信息
         *
         * @return
         */
        Observable<ApiResult<Void>> savaFaceOpinionLoanConditionData(FTaskFaceOpinionLoanConditionEntity request);
    }

    abstract class Presenter extends BasePresenter<View> {

        /**
         * 加载借款人信息数据
         */
        public abstract void loadFaceOpinionLoanConditionData();

        /**
         * 保存提交保存信息
         *
         * @param request
         */
        public abstract void saveFaceOpinionLoanCondition(FTaskFaceOpinionLoanConditionEntity request);
    }
}
